﻿<Window x:Class="VkClientIM.Windows.VideosWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
		xmlns:Converters="clr-namespace:VkClientIM.Converters" xmlns:Controls="clr-namespace:WPFMediaKit.DirectShow.Controls;assembly=WPFMediaKit" xmlns:MediaPlayers="clr-namespace:WPFMediaKit.DirectShow.MediaPlayers;assembly=WPFMediaKit" Title="Видео пользователя" Height="404" Width="497"
		WindowState="Maximized">
	<Window.Background>
		<LinearGradientBrush StartPoint="1,0">
			<GradientStop Color="Black" Offset="0"/>
			<GradientStop Color="LightBlue" Offset="0.75"/>
			<GradientStop Color="Black" Offset="1"/>
		</LinearGradientBrush>
	</Window.Background>
	<Window.Resources>
		<Converters:UrlToImageConverter x:Key="urlConverter"/>
	</Window.Resources>
    <Grid >
		<Grid.RowDefinitions>
			<RowDefinition Height="Auto"/>
			<RowDefinition Height="Auto"/>
			<RowDefinition Height="*"/>
		</Grid.RowDefinitions>
		<StackPanel Orientation="Horizontal" VerticalAlignment="Top" Grid.Row="0">
			<TextBlock Text="{Binding Path=FirstName}" FontSize="20" Foreground="DarkBlue"/>
			<TextBlock Text=" " FontSize="20"/>
			<TextBlock Text="{Binding Path=NickName}" FontSize="20" Foreground="DarkBlue"/>
			<TextBlock Text=" " FontSize="20"/>
			<TextBlock Text="{Binding Path=LastName}" FontSize="20" Foreground="DarkBlue"/>
		</StackPanel>
		<ListBox Grid.Row="1" ItemsSource="{Binding}" Name="videoPanel" SelectionMode="Single" SelectionChanged="VideoPanelSelectionChanged" Background="Transparent">
			<ListBox.ItemTemplate>
				<DataTemplate>
					<Border BorderBrush="Black" BorderThickness="1" CornerRadius="10">
						<Border.Background>
							<RadialGradientBrush>
								<GradientStop Color="Wheat" Offset="0"/>
								<GradientStop Color="Black" Offset="1"/>
							</RadialGradientBrush>
						</Border.Background>
						<StackPanel Margin="5,5,5,5">
							<Image Stretch="None" Source="{Binding Path=Image,Converter={StaticResource urlConverter},IsAsync=True}"/>
							<TextBlock TextWrapping="Wrap" Text="{Binding Path=Title}" Foreground="White"/>
						</StackPanel>
					</Border>
					
				</DataTemplate>
			</ListBox.ItemTemplate>
			<ListBox.ItemsPanel>
				<ItemsPanelTemplate>
					<WrapPanel />
				</ItemsPanelTemplate>
			</ListBox.ItemsPanel>
		</ListBox>
		<Border Grid.Row="2" Name="content">
			
		</Border>
		
	</Grid>
</Window>
